package com.zwz.bean;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

/**
 * 
 * @author 26943
 * @TableName airline_info
 * 航班实体类
 */
@Data
public class AirlineInfo implements Serializable {
    /**
     * 航线ID
     */
    @TableId(value = "airline_id",type = IdType.AUTO)
    private Integer airlineId;

    /**
     * 航空公司ID
     */
    private Integer companyId;

    /**
     * 航班号
     */
    private String airlineNumber;

    /**
     * 出发城市
     */
    private String beginCity;

    /**
     * 出发机场
     */
    private String beginAirport;

    /**
     * 出发时间
     */
    private Date beginTime;

    /**
     * 目的城市
     */
    private String lastCity;

    /**
     * 目的机场
     */
    private String lastAirport;

    /**
     * 到达时间
     */
    private Date lastTime;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AirlineInfo other = (AirlineInfo) that;
        return (this.getAirlineId() == null ? other.getAirlineId() == null : this.getAirlineId().equals(other.getAirlineId()))
            && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
            && (this.getAirlineNumber() == null ? other.getAirlineNumber() == null : this.getAirlineNumber().equals(other.getAirlineNumber()))
            && (this.getBeginCity() == null ? other.getBeginCity() == null : this.getBeginCity().equals(other.getBeginCity()))
            && (this.getBeginAirport() == null ? other.getBeginAirport() == null : this.getBeginAirport().equals(other.getBeginAirport()))
            && (this.getBeginTime() == null ? other.getBeginTime() == null : this.getBeginTime().equals(other.getBeginTime()))
            && (this.getLastCity() == null ? other.getLastCity() == null : this.getLastCity().equals(other.getLastCity()))
            && (this.getLastAirport() == null ? other.getLastAirport() == null : this.getLastAirport().equals(other.getLastAirport()))
            && (this.getLastTime() == null ? other.getLastTime() == null : this.getLastTime().equals(other.getLastTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAirlineId() == null) ? 0 : getAirlineId().hashCode());
        result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
        result = prime * result + ((getAirlineNumber() == null) ? 0 : getAirlineNumber().hashCode());
        result = prime * result + ((getBeginCity() == null) ? 0 : getBeginCity().hashCode());
        result = prime * result + ((getBeginAirport() == null) ? 0 : getBeginAirport().hashCode());
        result = prime * result + ((getBeginTime() == null) ? 0 : getBeginTime().hashCode());
        result = prime * result + ((getLastCity() == null) ? 0 : getLastCity().hashCode());
        result = prime * result + ((getLastAirport() == null) ? 0 : getLastAirport().hashCode());
        result = prime * result + ((getLastTime() == null) ? 0 : getLastTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", airlineId=").append(airlineId);
        sb.append(", companyId=").append(companyId);
        sb.append(", airlineNumber=").append(airlineNumber);
        sb.append(", beginCity=").append(beginCity);
        sb.append(", beginAirport=").append(beginAirport);
        sb.append(", beiginTime=").append(beginTime);
        sb.append(", lastCity=").append(lastCity);
        sb.append(", lastAirport=").append(lastAirport);
        sb.append(", lastTime=").append(lastTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}